package com.qiusuo0226.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qiusuo0226.core.pojo.entity.OrganizationDO;
import com.qiusuo0226.core.mapper.OrganizationMapper;
import com.qiusuo0226.core.service.OrganizationService;
import org.springframework.stereotype.Service;

/**
 * <h3>core</h3>
 * <p>组织机构数据处理层</p>
 *
 * @author : qiusuo
 * @date : 2022-06-15 18:12:14
 **/
@Service
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, OrganizationDO> implements OrganizationService {

    @Override
    public int moveAllToUnknownByDid(long iid) {
        UpdateWrapper wrapper = new UpdateWrapper();
        wrapper.eq("division_iid", iid);
        wrapper.set("division_iid", "0");
        return baseMapper.update(null, wrapper);
    }


}
